/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       sanctuary.h

	$Header: /game/sanctuary.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef SANCTUARY_H_INCLUDED
#define SANCTUARY_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "creature_array.h"
#include "owned_adv_object.h"
#include "player_color.h"

// ------------------------------------------------------------------------
// sanctuary for armies - heal, resurrect, remain safe from harm
// ------------------------------------------------------------------------
class t_sanctuary : public t_owned_adv_object, public t_creature_array
{
public:
	// Constructor
	t_sanctuary( std::string const& source );

	virtual void			activate_trigger( t_army* army, t_adv_map_point const& point, 
											  t_direction direction, 
											  t_adventure_frame* frame );
	virtual void			dump_visitors();
	virtual t_skill_mastery	get_anti_stealth_level() const;
	virtual int				get_version() const;
	virtual void			initialize( t_adventure_map& map );
	virtual bool			is_deleted_by_deletion_marker() const;
	virtual bool			is_triggered_by( t_creature_array const& army ) const;
	virtual void			left_double_click( t_mouse_event const& event, 
									           t_adventure_frame* frame );
	virtual void			on_begin_turn();
	virtual void			on_end_turn();
	virtual void			place( t_adventure_map& map, t_adv_map_point const& point );
	virtual void			process_new_day();
	virtual bool			read( std::streambuf&						stream, 
								  t_qualified_adv_object_type const&	type,
								  int									version );
	virtual void			read_postplacement( t_adventure_map& map );
	virtual void			right_click( t_mouse_event const& event,
							             t_adventure_frame* adventure_frame );
	virtual void			set_owner( int player_number );
	virtual bool			write( std::streambuf& stream ) const;	
							
protected:					
	bool					m_paid[k_active_player_color_count];
							
	virtual int				compute_scouting_range() const;
};

class t_sea_sanctuary : public t_sanctuary
{
public:
	// Constructor
	t_sea_sanctuary( std::string const& source );
	virtual void			dump_visitors();
	virtual bool			is_triggered_by( t_creature_array const& army ) const;
};

#endif // SANCTUARY_H_INCLUDED
